<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="admin/common/html/tableHead :: tableHead(~{::title},~{::link},~{::style})">

<title th:text=${title}></title>
<!-- 这儿引用单独的css link -->
<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
<!-- bootstrap-table表单样式 -->
<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>

<!-- 用户界面自定义css -->
<link th:href="@{/static/admin/user/css/user-add.css}" rel="stylesheet"/>
<style type="text/css"></style>

</head>

<body>

<div class="content-wrap">
	<div class="row">
		<div class="col-sm-12">
			<div class="nest" id="elementClose">
				<div class="">
				</div>
				<div class="body-nest" id="element">
					<div class="panel-body">
						<form  class="form-horizontal m" id="form-edit" th:object="${TAbbGoods}">
							<input id="id" name="id" type="hidden" th:field="*{id}"/>
													<div class="form-group">
										<label class="col-sm-3 control-label ">1,惠购商品 2 促销商品：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="type" name="type" th:value="*{type}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">审核状态（1，待审核 2，审核通过 3，审核未通过）：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="status" name="status" th:value="*{status}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">审核未通过原因：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="failreason" name="failreason" th:value="*{failreason}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">是否上架（0，上架 1下架）：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="isdel" name="isdel" th:value="*{isdel}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">是否被禁用（0，启用状态 1禁用状态）：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="isforbidden" name="isforbidden" th:value="*{isforbidden}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">是否是热推商品（0，不是 1，是）：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="ishotpush" name="ishotpush" th:value="*{ishotpush}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">是否是抢购商品(0,不是 1，是)：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="isqianggou" name="isqianggou" th:value="*{isqianggou}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">是否包邮（0，不包邮 1，包邮）：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="isbaoyou" name="isbaoyou" th:value="*{isbaoyou}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">区域分类：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="area" name="area" th:value="*{area}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">商铺名称：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="shopname" name="shopname" th:value="*{shopname}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">商铺id：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="shopid" name="shopid" th:value="*{shopid}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">商品名称：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodsname" name="goodsname" th:value="*{goodsname}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">商品编号：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodsbianhao" name="goodsbianhao" th:value="*{goodsbianhao}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">热推商品的轮播图：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodslunbo" name="goodslunbo" th:value="*{goodslunbo}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">商品图片：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodsimages" name="goodsimages" th:value="*{goodsimages}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">商品详情（图文）：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodscontent" name="goodscontent" th:value="*{goodscontent}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">商品原价：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodsyuanprice" name="goodsyuanprice" th:value="*{goodsyuanprice}"/>
										</div>
									</div>
<!--															<div class="form-group">-->
<!--										<label class="col-sm-3 control-label ">商品运送价：</label>-->
<!--										<div class="col-sm-8">-->
<!--											<input class="form-control" type="text" id="goodsyunsongprice" name="goodsyunsongprice" th:value="*{goodsyunsongprice}"/>-->
<!--										</div>-->
<!--									</div>-->
															<div class="form-group">
										<label class="col-sm-3 control-label ">商品到店消费价：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodszitiprice" name="goodszitiprice" th:value="*{goodszitiprice}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">包邮价格：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="goodsbaoyouprice" name="goodsbaoyouprice" th:value="*{goodsbaoyouprice}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">创建时间：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="creattime" name="creattime" th:value="*{creattime}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">排序时间：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="updatetime" name="updatetime" th:value="*{updatetime}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">预留字段1：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="yuliu1" name="yuliu1" th:value="*{yuliu1}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="yuliu2" name="yuliu2" th:value="*{yuliu2}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="yuliu3" name="yuliu3" th:value="*{yuliu3}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="yuliu4" name="yuliu4" th:value="*{yuliu4}"/>
										</div>
									</div>
															<div class="form-group">
										<label class="col-sm-3 control-label ">：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="yuliu5" name="yuliu5" th:value="*{yuliu5}"/>
										</div>
									</div>
										<div class="form-group">
								<div class="form-control-static col-sm-offset-9">
									<button type="submit" class="btn btn-primary">提交</button>
									<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- 通用js -->
<div th:include="admin/common/html/js :: onload_js">

</div>
<!-- bootstarp 表格 -->
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>


<!-- 弹窗 -->
<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
<!-- 遮罩层 -->
<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	 $(".MyDate").datetimepicker({
		 	format: "yyyy-mm-dd hh:00:00",
	        startDate: new Date(),
	        autoclose: true,
	        todayBtn: true,
	        language: 'zh-CN',
	        initialDate:new Date(),
	        minView: 1
	    });

})


$("#form-edit").validate({
	submitHandler : function(form) {
		edit();
	}
});

function edit() {
	var dataFormJson = $("#form-edit").serialize();
	$.ajax({
		cache : true,
		type : "POST",
		url : rootPath + "/TAbbGoodsController/edit",
		data : dataFormJson,
		async : false,
		error : function(request) {
			$.modal.alertError("系统错误");
		},
		success : function(data) {
			$.operate.saveSuccess(data);
		}
	});
}
</script>

</body>


</html>
